package Kolekcje;

class Pet implements Comparable{
	String name;
	public Pet(){
		name="Pet";
	}
	public Pet(String name){
		this.name=name;
	}
	@Override
	public String toString() {
		return "Pet "+name;
	}
	@Override
	public int compareTo(Object o) {
		return o.toString().compareTo(this.toString());
		}

}

class Hamster extends Pet {
	String name;
	public Hamster(){
		name="Hamster";
	}
	public Hamster(String name){
		this.name=name;
	}
	@Override
	public String toString() {
		return "Hamster [name=" + name + "]";
	}
	
}

class Mouse extends Pet {
	String name;
	public Mouse(){
		name="Mouse";
	}
	public Mouse(String name){
		this.name=name;
	}
	@Override
	public String toString() {
		return "Mouse [name=" + name + "]";
	}
}

class Pug extends Pet {
	String name;
	public Pug(){
		name="Pug";
	}
	public Pug(String name){
		this.name=name;
	}
	@Override
	public String toString() {
		return "Pug [name=" + name + "]";
	}
}

class Rat extends Pet {
	String name;
	public Rat(){
		name="Rat";
	}
	public Rat(String name){
		this.name=name;
	}
	@Override
	public String toString() {
		return "Rat [name=" + name + "]";
	}
}

class Mutt extends Pet {
	String name;
	public Mutt(){
		name="Mutt";
	}
	public Mutt(String name){
		this.name=name;
	}
	@Override
	public String toString() {
		return "Mutt [name=" + name + "]";
	}
}

class Manx extends Pet {
	String name;
	public Manx(){
		name="Manx";
	}
	public Manx(String name){
		this.name=name;
	}
	@Override
	public String toString() {
		return "Manx [name=" + name + "]";
	}
}
